//
//  FilterView.swift
//  DoctorVisits
//
//  Created by lanou3g on 16/2/29.
//  Copyright © 2016年 SHH. All rights reserved.
//

import UIKit

class FilterView: UIView {
    
    let width = UIScreen.mainScreen().bounds.width
    let height = UIScreen.mainScreen().bounds.height
    
    var fristOne:UIButton?
    var fristTwo:UIButton?
    var fristThree:UIButton?
    
    
    override  init(frame: CGRect) {
        super.init(frame: frame)
        
        self.backgroundColor = UIColor.yellowColor()
        addViews()
    }
    
    func addViews() -> Void{
        
        fristOne = UIButton(type: UIButtonType.Custom)
        fristOne?.frame = CGRectMake(0, height*0.0005, width*0.13, height*0.05)
        fristOne?.setTitleColor(UIColor.blackColor(), forState: UIControlState.Normal)
        fristOne?.titleLabel?.font = UIFont.systemFontOfSize(17)
        fristOne?.setTitle("最热", forState: UIControlState.Normal)
        self.addSubview(fristOne!)
        
        fristTwo = UIButton(type: UIButtonType.Custom)
        fristTwo?.frame = CGRectMake(width*0.13, height*0.0005, width*0.13, height*0.05)
        fristTwo?.setTitle("最新", forState: UIControlState.Normal)
        fristTwo?.setTitleColor(UIColor.blackColor(), forState: UIControlState.Normal)
        fristTwo?.titleLabel?.font = UIFont.systemFontOfSize(17)
        self.addSubview(fristTwo!)
        
        fristThree = UIButton(type: UIButtonType.Custom)
        fristThree?.frame = CGRectMake(width*0.26, height*0.0005, width*0.13, height*0.05)
        fristThree?.setTitle("好评", forState: UIControlState.Normal)
        fristThree?.setTitleColor(UIColor.blackColor(), forState: UIControlState.Normal)
        fristThree?.titleLabel?.font = UIFont.systemFontOfSize(17)
        self.addSubview(fristThree!)
        
        
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    
    
    
}
